Instance 0

Class0.Acceptor(String host,int port)#2{
            InetSocketAddress address = (host == null?
                    new InetSocketAddress(port:
                    new InetSocketAddress(host, port);
            serverSocket.bind(address);
}


Instance 1

Class110.keepOneInterface(InetAddress addr,int port)#3{
      if (addr != null) {
        server.bind(new InetSocketAddress(addr, port));
      }
      else {
        server.bind(new InetSocketAddress(port));
      }
      Keeper result = new Keeper(server, port);
}


Instance 2

Class10.listen(String hostname,int port,F2<Void,BufferedReader,DataOutputStream> protocol)#2{
      socket.bind(U.isEmpty(hostnamenew InetSocketAddress(portnew InetSocketAddress(hostname, port));
      Log.info("Starting TCP/IP server""host", hostname, "port", port);
}


Instance 3

Class270.test_isBound()#0{
        server.bind(new InetSocketAddress(InetAddress.getLocalHost()0));
        InetSocketAddress boundAddress = new InetSocketAddress(server
                .getInetAddress(), server.getLocalPort());
        client.connect(boundAddress);
        worker = server.accept();
}


Instance 4

Class560.run()#6{
        if((page.getStr("BIND")!=null)&&(page.getStr("BIND").trim().length()>0))
          serverSocket.bind (new InetSocketAddress(InetAddress.getByName(page.getStr("BIND")),port));
        else
          serverSocket.bind (new InetSocketAddress (port));
        Log.sysOut("Started "+name+" on port "+port);
}


Instance 5

Class450.main(String[] args)#0{
            ss.bind(new InetSocketAddress(0));
            int localPort = ss.getLocalPort();
            SocketChannel channel = SocketChannel.open(new InetSocketAddress("localhost", localPort));
}


Instance 6

Class520.test_bindLjava_net_SocketAddress()#2{
            theAddress = new InetSocketAddress(InetAddress.getLocalHost()0);
            theSocket.bind(theAddress);
            SocketAddress localAddress = theSocket.getLocalSocketAddress();
            theSocket2.bind(localAddress);
}


Instance 7

Class40.test_bindLjava_net_SocketAddressI()#7{
            theAddress = new InetSocketAddress(InetAddress.getLocalHost()0);
            theSocket.bind(theAddress, 5);
            SocketAddress inuseAddress = theSocket.getLocalSocketAddress();
            theSocket2.bind(inuseAddress, 5);
}


Instance 8

Class510.connect(BusAddress address,int timeout)#3{
            ss.bind(new InetSocketAddress(address.getParameter("host"), Integer.parseInt(address.getParameter("port"))));
            s = ss.accept();
            s.connect(new InetSocketAddress(address.getParameter("host"), Integer.parseInt(address.getParameter("port"))));
         in = s.getInputStream();
         out = s.getOutputStream();
}


Instance 9

Class400.validateHost(InetAddress host)#0{
            ss.bind(new InetSocketAddress(host, 0));
            s1 = new Socket(host, ss.getLocalPort());
            s2 = ss.accept();
            if (s2 != null) {
                try {
                    s2.close();
                catch (IOException e) {
                    // Ignore
                }
            }
            if (s1 != null) {
                try {
                    s1.close();
                catch (IOException e) {
                    // Ignore
                }
            }
            if (ss != null) {
                try {
                    ss.close();
                catch (IOException e) {
                    // Ignore
                }
            }
}


Instance 10

Class20.testIsPortAvailableValidatesAddress()#0{
        ss.bind(new InetSocketAddress(InetAddress.getLocalHost()0));
        int boundPort = ss.getLocalPort();
        assertTrue(ss.isBound());
        assertNotEquals(boundPort, 0);
        assertFalse(Networking.isPortAvailable(boundPort));
        ss.close();
}


Instance 11

Class230.main(String[] args)#0{
        InetSocketAddress s = new InetSocketAddress(InetAddress.getLocalHost()0);
        sock.bind(s);
        int port = sock.getLocalPort();
        sock.close();
        Endpoint.publish(address, new GreeterImpl(port));
}


Instance 12

Class140.isLocalHostAddressReachable(String hostAddress,int port)#3{
      serverSocket.bind(new InetSocketAddress(InetAddress.getByName(hostAddress), port));
      port = serverSocket.getLocalPort();
      serverSocket.close();
}


Instance 13

Class450.getPort()#0{
                sock.bind(new InetSocketAddress(0));
                int value = sock.getLocalPort();
                sock.close();
}


Instance 14

Class220.checkPortIsFree(int port)#0{
      socket.bind(new InetSocketAddress("localhost", port));
      int localPort = socket.getLocalPort();
      socket.close();
}


Instance 15

Class310.setup()#0{
            s.bind(new InetSocketAddress(0));
            port = s.getLocalPort();
            s.close();
}


Instance 16

Class540.getPort()#1{
                sock.bind(new InetSocketAddress(0));
                int value = sock.getLocalPort();
                sock.close();
}


Instance 17

Class250.getThriftServerDefBuilder()#0{
            s.bind(new InetSocketAddress(0));
            port = s.getLocalPort();
            s.close();
}


Instance 18

Class280.findUnusedPort()#0{
            socket.bind(new InetSocketAddress(0));
            port = socket.getLocalPort();
            socket.close();
}


Instance 19

Class330.port()#1{
            socket.bind(
                new InetSocketAddress("localhost"0)
            );
            return socket.getLocalPort();
            socket.close();
}


Instance 20

Class310.test_LocalPort()#0{
        ss2.bind(new InetSocketAddress("127.0.0.1"4343));
        assertEquals(ss2.getLocalPort()4343);
        ss2.close();
}


Instance 21

Class280.start(Properties props)#0{
        String v = props.getProperty(ADDRESS_PROPERTY);
        InetAddress address = v == null null : InetAddress.getByName(v);
        int port = Integer.parseInt(props.getProperty(PORT_PROPERTY, "0"));
        InetSocketAddress socketAddress = new InetSocketAddress(address, port);
        socket.bind(socketAddress);
        Main.log("Started server listening on " + socket.getLocalSocketAddress() ":"
            + socket.getLocalPort());
}


Instance 22

Class420.performancePreferenceTest(int connectionTime,int latency,int bandwidth)#5{
        InetSocketAddress theAddress = new InetSocketAddress(InetAddress
                .getLocalHost()0);
        theSocket.bind(theAddress);
        int portNumber = theSocket.getLocalPort();
}


Instance 23

Class520.test_bindLjava_net_SocketAddress()#8{
        InetSocketAddress theAddress = new InetSocketAddress(InetAddress
                .getLocalHost()0);
        theSocket.bind(theAddress);
        int portNumber = theSocket.getLocalPort();
}


Instance 24

Class40.test_bindLjava_net_SocketAddressI()#12{
        InetSocketAddress theAddress = new InetSocketAddress(InetAddress
                .getLocalHost()0);
        theSocket.bind(theAddress, 5);
        int portNumber = theSocket.getLocalPort();
}


Instance 25

Class420.test_getLocalSocketAddress()#1{
        theSocket
                .bind(new InetSocketAddress(InetAddress.getLocalHost()0));
        int localPort = theSocket.getLocalPort();
}


Instance 26

Class190.getPort(int portStart,int retries)#0{
                addr = new InetSocketAddress(InetAddress.getByName(InetAddress.getLocalHost().getHostAddress()),
                                             portStart);
                socket.bind(addr);
                socket.close();
}


Instance 27

Class390.test_isBound()#1{
        serverSocket.bind(new InetSocketAddress(addr, 0));
        assertTrue("Socket indicated  not bound when it should be (1)",
                serverSocket.isBound());
        serverSocket.close();
        serverSocket = new ServerSocket(0);
        assertTrue("Socket indicated  not bound when it should be (2)",
                serverSocket.isBound());
        serverSocket.close();
        serverSocket = new ServerSocket(05, addr);
        assertTrue("Socket indicated  not bound when it should be (3)",
                serverSocket.isBound());
        serverSocket.close();
        serverSocket = new ServerSocket(05);
        assertTrue("Socket indicated  not bound when it should be (4)",
                serverSocket.isBound());
        serverSocket.close();
}


Instance 28

Class430.testBindError()#2{
    InetSocketAddress address = new InetSocketAddress("0.0.0.0",0);
    socket.bind(address);
      int min = socket.getLocalPort();
      conf.set("TestRange", min+"-"+min);
      ServerSocket socket2 = new ServerSocket();
}


Instance 29

Class190.testBind()#3{
    InetSocketAddress address = new InetSocketAddress("0.0.0.0",0);
    socket.bind(address);
      int min = socket.getLocalPort();
      conf.set("TestRange", min+"-"+max);
      ServerSocket socket2 = new ServerSocket();
}


Instance 30

Class560.AEProxyImpl(int _port,long _connect_timeout,long _read_timeout,AEProxyHandler _proxy_handler)#4{
      ss.bind(  new InetSocketAddressInetAddress.getByName("127.0.0.1"), port)128 );
      if port == ){
        
        port  = ss.getLocalPort();
      }
        new AEThread("AEProxy:connect.loop")
        {
          public void
          runSupport()
          {
            selectLoopconnect_selector );
          }
        };
      connect_thread.setDaemontrue );
      connect_thread.start();
}


Instance 31

Class520.testJaasDualStopWithOpenConnection()#1{
        InetAddress address = InetAddress.getLocalHost();
        socket.bind(new InetSocketAddress(address, listenPort));
        LOG.info("bound address: " + socket);
        socket.close();
}


Instance 32

Class100.acceptUnbound()#0{
        sslServerSocket.bind(new java.net.InetSocketAddress(serverPort));
        if (!sslServerSocket.isBound())
            throw new Exception("Server socket is not bound!");
        Socket sslSocket = sslServerSocket.accept();
        sslServerSocket.close();
}


Instance 33

Class420.runHttpServer(int port)#6{
        ss.bind(new InetSocketAddress("localhost", port));
        System.err.println("Serving file leak stats on http://localhost:"+ss.getLocalPort()+"/ for stats");
}


Instance 34

Class100.freePort()#0{
      socket.bind(new InetSocketAddress(0));
      return socket.getLocalPort();
}


Instance 35

Class70.test(InetAddress addr)#5{
            ss.bind(new InetSocketAddress(addr, 0));
            int port = ss.getLocalPort();
}


Instance 36

Class140.createServerSocket(int port)#1{
            ss.bind(new InetSocketAddress(bindAddr, port), backlog);
            ss.close();
            ss.close();
}


Instance 37

Class30.main(String[] args)#2{
        s.bind (new InetSocketAddress (0));
        int port = s.getLocalPort ();
}


Instance 38

Class480.run2(Context context)#7{
    InetSocketAddress sa = new InetSocketAddress("127.0.0.1"0);
    ss.bind(sa);
    String localPortString = Integer.toString(ss.getLocalPort());
}


Instance 39

Class560.test(InetAddress addr)#13{
            ss.bind(new InetSocketAddress(addr, 0));
            int port = ss.getLocalPort();
}


Instance 40

Class230.bind()#0{
    socketServer.bind(new InetSocketAddress(bindingPort));
    int port = socketServer.getLocalPort();
}


Instance 41

Class240.run2(Context context)#3{
    InetSocketAddress sa = new InetSocketAddress("127.0.0.1"0);
    ss.bind(sa);
    int localPort = ss.getLocalPort();
}


Instance 42

Class320.runNativeSide(String[] args)#13{
            serverSocket.bind(new InetSocketAddress(Utils.getLocalHostAddress(), port));
            if(serverSocket != null) {
              try {
                serverSocket.close();
              catch(Exception ex) {
              }
            }
        if(serverSocket == null) {
          if(exception == null) {
            throw new IllegalStateException("Failed to create the server socket for native side communication!");
          }
          throw exception;
        }
}


Instance 43

Class470.startConsole()#48{
                            InetSocketAddress isa = new InetSocketAddress(host, 0);
                            testSock.bind(isa);
                            if (testSock != nulltry testSock.close()catch (IOException ioe) {}
}


Instance 44

Class320.getFreePort()#0{
                ss.bind(new InetSocketAddress(port));
                ss.close();
                ss = new ServerSocket();
                ss.setReuseAddress(false);
}


Instance 45

Class470.startConsole()#9{
                                InetSocketAddress isa = new InetSocketAddress(host, 0);
                                testSock.bind(isa);
                                if (testSock != nulltry testSock.close()catch (IOException ioe) {}
}


Instance 46

Class490.setup(ExecutorType clientExecutor,ExecutorType serverExecutor,PayloadSize requestSize,PayloadSize responseSize,FlowWindowSize windowSize,ChannelType channelType,int maxConcurrentStreams,int channelCount)#14{
      sock.bind(new InetSocketAddress(BENCHMARK_ADDR, 0));
      SocketAddress address = sock.getLocalSocketAddress();
      sock.close();
      serverBuilder = NettyServerBuilder.forAddress(address);
      channelBuilder = NettyChannelBuilder.forAddress(address);
}


Instance 47

Class540.getFreePort()#1{
                ss.bind(new InetSocketAddress(port));
                ss.close();
                ss = new ServerSocket();
                ss.setReuseAddress(false);
}


Instance 48

Class30.main(String args[])#3{
            ss = new ServerSocket();
            ss.bindnew InetSocketAddress(port) );
            ss.close();
}


Instance 49

Class430.main(String args[])#1{
        ss = new ServerSocket();
        ss.bindnew InetSocketAddress(port) );
        ss.close();
}


Instance 50

Class180.start()#14{
                        serverSocket.bind(new InetSocketAddress(this.inetAddress, this.port)this.backlog);
                serverSocket.setSoTimeout(this.timeout);
                int serverPort = serverSocket.getLocalPort();
}


Instance 51

Class530.openServerSocket(int port,String user)#2{
            serverSocket.bindnew InetSocketAddressport )100 );
            serverSocket.close();
}


Instance 52

Class320.getFreePort()#5{
                ss.bind(new InetSocketAddress(NetUtil.LOCALHOST, port));
                ss.close();
}


Instance 53

Class500.findFreePort(int startRange,int endRange,int[] excluding)#1{
          socket.bind(new InetSocketAddress("127.0.0.1", i))//$NON-NLS-1$
          socket.close();
}


Instance 54

Class240.canBindToLocalSocket(String host,int port)#0{
        socket.bind(new InetSocketAddress(host, port));
          socket.close();
}


Instance 55

Class480.getValidatedDebugPort()#2{
                server.bindnew InetSocketAddressport ) );
                server.close();
}


Instance 56

Class540.getFreePort()#0{
                ss.bind(new InetSocketAddress(LOCALHOST, port));
                ss.close();
}


Instance 57

Class320.ServerSocketTests()#8{
            s2.bindnew InetSocketAddress(s1.getLocalPort()) );
}


Instance 58

Class40.test_bindLjava_net_SocketAddressI()#16{
        theAddress = new InetSocketAddress(InetAddress.getLocalHost()0);
        theSocket.bind(theAddress, 4);
        localAddress = theSocket.getLocalSocketAddress();
}


Instance 59

Class360.paintComponent(BufferedImage image,Rectangle[] rectangles)#7{
      String localHostAddress = Utils.getLocalHostAddress();
      if(localHostAddress == null) {
        localHostAddress = "127.0.0.1";
      }
      serverSocket.bind(new InetSocketAddress(InetAddress.getByName(localHostAddress)0));
}


Instance 60

Class300.pickAddress()#7{
                    if (bindAny) {
                        inetSocketAddress = new InetSocketAddress(port);
                    else {
                        inetSocketAddress = new InetSocketAddress(bindAddressDef.inetAddress, port);
                    }
                    log(Level.FINEST, "Trying to bind inet socket address:" + inetSocketAddress);
                    serverSocket.bind(inetSocketAddress, 100);
                    log(Level.FINEST, "Bind successful to inet socket address:" + inetSocketAddress);
}


Instance 61

Class120.inheritedChannel()#1{
                serverSocket.bind(
                     new InetSocketAddress(InetAddress.getLocalHost(), PORT));
}


Instance 62

Class20.createServerSocket(int port)#1{
      if (port == 0) {
        sock.bind(null);
        serverPort = sock.getLocalPort();
      else {
        sock.bind(new InetSocketAddress(port));
      }
      throw new IOException("Could not create ServerSocket on port " + port + "." +
                            ioe);
}


Instance 63

Class80.shouldSendMessage()#0{
        server.bind(new InetSocketAddress((InetAddressnull, pid2.getReplicaPort()));
        Socket socket = server.accept();
        DataInputStream inputStream = new DataInputStream(socket.getInputStream());
        assertEquals(1, inputStream.readInt());
}


Instance 64

Class230.activeConnectionShouldSendLocalId()#3{
        server.bind(new InetSocketAddress((InetAddressnull, pid2.getReplicaPort()));
        Socket socket = server.accept();
        DataInputStream inputStream = new DataInputStream(socket.getInputStream());
        assertEquals(1, inputStream.readInt());
        inputStream.close();
}


Instance 65

Class400.run()#2{
            serverSocket.bind(new InetSocketAddress(port));
            Socket socket = serverSocket.accept();
            InputStream is = socket.getInputStream();
            socket.shutdownOutput();
}


Instance 66

Class280.expectBadClientSingle()#2{
            server.bind(new InetSocketAddress(LOCALHOST, SERVER_PORT));
            return badSend(new Socket(LOCALHOST, SERVER_PORT), server.accept()null);
}


Instance 67

Class290.run()#1{
                server.bind(new InetSocketAddress_port ) );
                s = server.accept();
                TunnelSocket ts = (TunnelSocket)s;
                ts.verify();
                System.out.printlnts.getSubject() );
}


Instance 68

Class290.createOutProcessMessagingInterface()#2{
            serverSocket.bind(new InetSocketAddress(InetAddress.getByName(localHostAddress)0));
}


Instance 69

Class30.getUnusedPort()#4{
                InetSocketAddress address = new InetSocketAddress(InetAddress.getByName("localhost"), port);
                serverSocket.bind(address, 10);
}


Instance 70

Class520.testStateAfterClose()#2{
        ss.bind(new InetSocketAddress(Inet4Address.getLocalHost()0));
        InetSocketAddress boundAddress = (InetSocketAddressss.getLocalSocketAddress();
}


Instance 71

Class460.createBoundServerSocket(final String uniqueUserName,final Socket controlConnection)#0{
        serverSocket.bind(new InetSocketAddress(controlConnection.getLocalAddress(), controlConnection.getLocalPort()));
        serverSocket.setSoTimeout(this.socketTimeoutInMillis);
}


Instance 72

Class500.newJVM(String displayName,TaskListener listener,JVMBuilder vmb,FilePath workDir,ClasspathBuilder classpath)#3{
        serverSocket.bind(new InetSocketAddress("localhost",0));
        serverSocket.setSoTimeout(10*1000);
}


Instance 73

Class350.createSeleniumRCVM(File standaloneServerJar,TaskListener listener,Map<String,String> properties,Map<String,String> envVariables)#6{
        serverSocket.bind(new InetSocketAddress("localhost"0));
        serverSocket.setSoTimeout(10000);
}


Instance 74

Class100.main(String... args)#2{
            ss.bind(new InetSocketAddress(params.getLocalHost(), params.getLocalPort()));
                ssh.newLocalPortForwarder(params, ss).listen();
}


Instance 75

Class520.test_bindLjava_net_SocketAddress()#1{
            theSocket.bind(new InetSocketAddress(InetAddress
                    .getByAddress(Support_Configuration.nonLocalAddressBytes),
                    0));
}


Instance 76

Class40.test_bindLjava_net_SocketAddressI()#8{
            theSocket.bind(new InetSocketAddress(InetAddress
                    .getByAddress(Support_Configuration.nonLocalAddressBytes),
                    0)5);
}


Instance 77

Class450.listen(InetAddress localEp)#1{
        InetSocketAddress address = new InetSocketAddress(localEp, DatabaseDescriptor.getStoragePort());
            ss.bind(address);
}


Instance 78

Class210.getServerSockets(InetAddress localEp)#0{
            InetSocketAddress address = new InetSocketAddress(localEp, DatabaseDescriptor.getStoragePort());
                socket.bind(address,500);
}


Instance 79

Class390.getServerSocket(InetAddress localEp)#4{
        InetSocketAddress address = new InetSocketAddress(localEp, DatabaseDescriptor.getStoragePort());
            socket.bind(address);
}


Instance 80

Class200.main(String[] args)#1{
        ss.bind(new InetSocketAddress(addr, 0));
        addr = (Inet6Address)InetAddress.getByAddress (
            addr.getAddress()
        );
}


Instance 81

Class60.bind(ServerSocket socket,int portstart,int retries)#1{
                addr = new InetSocketAddress(getBind(), portstart);
                socket.bind(addr);
                setPort(portstart);
                log.info("Receiver Server Socket bound to:"+addr);
}


Instance 82

Class260.bind(ServerSocket socket,int portstart,int retries)#0{
                    addr = new InetSocketAddress(getBind(), port);
                    socket.bind(addr);
                    setPort(port);
                    log.info("Receiver Server Socket bound to:"+addr);
}


Instance 83

Class270.getLocalPort(ServerSocket socket,String hostname,int port)#1{
        addr = new InetSocketAddress(hostname, port);
        socket.bind(addr);
        log.info("Receiver Server Socket bound to:" + addr);
}


Instance 84

Class410.badSend(Socket from,Socket to,ServerSocket server)#8{
                another.bind(new InetSocketAddress(LOCALHOST, SERVER_PORT));
                another.setReuseAddress(true);
}


Instance 85

Class130.isPortAvailable(final String port)#1{
            serverSocket.bindnew InetSocketAddressInteger.parseIntport ) ) );
}


Instance 86

Class60.createServerSocket(int nport,int backlog,InetAddress bindAddr,List<GatewayTransportFilter> transportFilters,int socketBufferSize)#0{
        result.bind(new InetSocketAddress(bindAddr, nport), backlog);
        BindException throwMe = new BindException(
            LocalizedStrings.SocketCreator_FAILED_TO_CREATE_SERVER_SOCKET_ON_0_1
                .toLocalizedString(new Object[] { bindAddr,
                    Integer.valueOf(nport) }));
        throwMe.initCause(e);
}


Instance 87

Class40.createServerSocket(int nport,int backlog,InetAddress bindAddr,int socketBufferSize)#1{
            result.bind(new InetSocketAddress(bindAddr, nport), backlog);
            BindException throwMe = new BindException(LocalizedStrings.SocketCreator_FAILED_TO_CREATE_SERVER_SOCKET_ON_0_1.toLocalizedString(new Object[] {bindAddr, Integer.valueOf(nport)}));
            throwMe.initCause(e);
}


Instance 88

Class180.forwardLocalPortTo(int localPort,String targetHost,int targetPort)#2{
    ss.bind(new InetSocketAddress(params.getLocalHost(), params
        .getLocalPort()));
          ssh.newLocalPortForwarder(params, ss).listen();
}


Instance 89

Class480.initializeClusterManagerCallbackServer()#3{
    serverSocket.bind(new InetSocketAddress(0));
    TServerSocket tSocket = new TServerSocket(serverSocket, soTimeout);
}


Instance 90

Class410.TraceServer(ServerConfigurationFactory serverConfiguration,String hostname)#10{
    sock.bind(new InetSocketAddress(hostname, port));
    final TServerTransport transport = new TServerSocket(sock);
    TThreadPoolServer.Args options = new TThreadPoolServer.Args(transport);
}


Instance 91

Class550.create(SSHClient client,String remoteHostName,String localHost,int localPort,String remoteHost,int remotePort)#1{
            ss.bind(new InetSocketAddress(localHost, localPort));
            final LocalPortForwarder forwarder = client.newLocalPortForwarder(params, ss);
                        forwarder.listen();
}


Instance 92

Class540.expectBadServerSingle()#1{
            server.bind(new InetSocketAddress(LOCALHOST, SERVER_PORT));
            Socket client = new Socket(LOCALHOST, SERVER_PORT);
}


Instance 93

Class440.openSocket()#2{
      Log.info("Opening port to listen""port", port);
      InetSocketAddress addr = new InetSocketAddress(port);
      socket.bind(addr);
      Log.info("Opened socket""address", addr);
}


Instance 94

Class30.testSocketSimple()#0{
        for (port = 9900; port < 9999; port++) {
            try {
                ss.bind(new InetSocketAddress("127.0.0.1", port));
                lastEx = null;
                break;
            catch (IOException ex) {
                lastEx = ex;
            }
        }
}


Instance 95

Class480.isPortAvailable(InetAddress localAddress,int port)#11{
                ss.bind(new InetSocketAddress(localAddress, port));
}


Instance 96

Class480.isRoot0()#10{
                ss.bind(new InetSocketAddress(i));
}


Instance 97

Class480.startMemcachedServer()#5{
    serverSocket.bind(new InetSocketAddress(getBindAddress(), serverPort));
}


Instance 98

Class230.doWithBlockedPort(final int port,Runnable action)#0{
    serverSocket.bind(new InetSocketAddress(port));
}


Instance 99

Class510.createServerSocket(int port,int backlog)#1{
        serverSocket.bind(new InetSocketAddress(port), backlog);
}


Instance 100

Class10.isAddressValid(InetAddress addr)#3{
            ss.bind(new InetSocketAddress(addr, 0));
}


Instance 101

Class200.main(String[] args)#0{
        ss.bind(new InetSocketAddress(addr, 0));
}


Instance 102

Class180.openChannel(int listenPort,Boolean isSSL)#3{
    serverSocket.bind (new InetSocketAddress (listenPort));
}


Instance 103

Class180.start()#17{
                    serverSocket.bind(new InetSocketAddress(this.inetAddress, this.port)this.backlog);
}


Instance 104

Class430.createServerSocket(String listenAddress,int port)#1{
        socket.bind(new InetSocketAddress(listenAddress, port));
}


Instance 105

Class460.Acceptor(LogConfig config,Queue<SocketChannel> acceptQueue,Selector selector)#0{
            serverSocket.bind(new InetSocketAddress(config.port));
}


Instance 106

Class460.Acceptor(LogConfig config,Queue<SocketChannel> acceptQueue,Selector selector)#2{
            serverSocket.bind(new InetSocketAddress(config.port),
                    config.listenQSize);
}


Instance 107

Class70.main(String[] args)#7{
            new InetSocketAddress((port == -1: port);
        serverSocket.bind(bindAddr);
        log.println();
}


Instance 108

Class440.createServerSocket(int port)#0{
        serverSocket.bind(new InetSocketAddress(port));
}


Instance 109

Class440.bindSocket(ServerSocket socket)#0{
        socket.bind(new InetSocketAddress(getPort())* getMaxActiveClientCount());
}


Instance 110

Class440.createBoundServerSocket()#1{
        serverSocket.bind(new InetSocketAddress(this.sourcePort));
}


Instance 111

Class490.trySocket(int port)#1{
            s.bind(new InetSocketAddress(address,port));
}


Instance 112

Class490.bind(ServerSocket socket,int portstart,int retries)#1{
                addr = new InetSocketAddress(port);
                socket.bind(addr);
}


Instance 113

Class490.test()#1{
            ss.bind(new InetSocketAddress(0));
            Server s = new Server(ss);
            s.start();
}


Instance 114

Class140.installWithJMXPortConflict()#5{
            serverSocket.bind(new InetSocketAddress(address, 7799));
}


Instance 115

Class250.createServerSocketChannel(int port)#1{
      serverSocket.bind(new InetSocketAddress(port));  // bind to the port to listen.
}


Instance 116

Class250.tryBind(int localPort)#1{
                ss.bind(new InetSocketAddress("localhost", localPort));
}


Instance 117

Class150.createServerSocketChannel(InetAddress bindingInetAddress,int startPort,ServerSocketConfigurator serverSocketConfigurator)#2{
        serverSocket.bind(
          new InetSocketAddress(bindingInetAddress, port));
}


Instance 118

Class280.testCreateServerSocket()#0{
        serverSocket.bind(new InetSocketAddress(0));
        testSocket(serverSocket, 50);
}


Instance 119

Class530.openServerSocket(int port,String user)#4{
        serverSocket.bindnew InetSocketAddressport ) );
}


Instance 120

Class530.main(String[] args)#9{
        ss.bind(new InetSocketAddress("localhost",0));
}


Instance 121

Class530.bind(ServerSocket socket,InetAddress address,int backlog)#0{
        int start = random();
        do {
            try {
                socket.bind(new InetSocketAddress(address, port), backlog);
                return port;
            catch (BindException e) {
            }
            port = succ(port);
        while (port != start);
}


Instance 122

Class120.recreateServerSocket(int fdn)#3{
        ss.bind(new InetSocketAddress(0));
}


Instance 123

Class170.isPortFree(int port)#1{
      socket.bind(new InetSocketAddress(port));
}


Instance 124

Class190.run()#5{
            InetSocketAddress listenAddress = new InetSocketAddress(listenPort);
            serverSocket.bind(listenAddress);
}


Instance 125

Class450.main(String[] args)#1{
    sock.bind(new InetSocketAddress(2300));
}


Instance 126

Class320.ServerSocketTests()#10{
        s1.bindnew InetSocketAddress(0) );
}


Instance 127

Class500.createServerSocket(int port,int backlog,InetAddress ifAddress)#1{
        serverSocket.bind(new InetSocketAddress(ifAddress, port), backlog);
}


Instance 128

Class500.trySocket(int port)#2{
            s.bind(new InetSocketAddress(address,port));
}


Instance 129

Class240.testRunServer()#2{
        sock.bind(new InetSocketAddress("0.0.0.0", PORT));
}


Instance 130

Class290.available(int port)#8{
            ss.bind(new InetSocketAddress((InetAddressnull, port)0);
}


Instance 131

Class290.serve(int port)#7{
        InetSocketAddress address = new InetSocketAddress(port);
        ss.bind(address);
}


Instance 132

Class400.isPortBound(String address,int port,String portName,int potentialErrorCode)#2{
            serverSocket.bind(new InetSocketAddress(address, port));
            throw new StorageInstallerException("The " + portName + " (" + address + ":" + port
                ") is already in use. " "Installation cannot proceed.", potentialErrorCode);
}


Instance 133

Class420.createServerSocketUsingPortRange(InetAddress ba,int backlog,boolean isBindAddress,boolean useNIO,int tcpBufferSize,int[] tcpPortRange)#6{
          InetSocketAddress addr = new InetSocketAddress(isBindAddress ? ba : null, localPort);
          socket.bind(addr, backlog);
}


Instance 134

Class50.ServerSocketChannelAcceptor(int listenPort)#0{
            sock.bind(new InetSocketAddress(listenPort)5);
}


Instance 135

Class210.isPortAvailable(int port)#2{
      InetSocketAddress sa = new InetSocketAddress(port);
      serverSocket.bind(sa);
}


Instance 136

Class300.bind(ServerSocket socket,InetSocketAddress address,int backlog,Configuration conf,String rangeConf)#2{
            InetSocketAddress temp = new InetSocketAddress(address.getAddress(),
                port);
            socket.bind(temp, backlog);
}


Instance 137

Class300.createServerSocket(String type,int port)#3{
        serverSocket.bind(new InetSocketAddress(port));
}


Instance 138

Class20.createServerSocketTry(String listenAddress,int port,boolean ssl)#0{
            socket.bind(new InetSocketAddress(listenAddress, port));
            throw DbException.convertIOException(e, "port: " + port + " ssl: " + ssl);
}


Instance 139

Class20.createServerSocket()#1{
      final InetSocketAddress endpoint = new InetSocketAddress(host, port);
      result.bind(endpoint);
      logger.info("Bound control endpoint at {}:{}", host, port);
      throw new IllegalStateException("Failed to bind control endpoint at " +  host + ":" + port, e);
}


Instance 140

Class410.startFailed()#0{
            s.bind(new InetSocketAddress(Inet4Address.getByName(host),port));
            agent.setPort(port);
            agent.setHost(host);
            agent.initialise();
            agent.start();
}


Instance 141

Class420.start()#1{
        sock.bind(null);
        address = new InetSocketAddress(hostname, sock.getLocalPort());
        port = address.getPort();
}